<template>
	<view class="content">
		<navigation />
		<scroll-view scroll-y refresher-enabled @refresherrefresh="onRefresh" @scrolltolower="loadMore"
			:refresher-triggered="isRefreshing">
			<view class="list">
				<view class="search-box">
					<image src="/static/index/search.png" />
					<text>搜索</text>
				</view>
				<view class="pc" v-if="false">
					<image src="/static/index/Computer.png" />
					<text>Mac微信已登录</text>
				</view>
				<view class="lind2" />
				<view class="chatList" v-for="(i,key) in wxlist">
					<view class="box" @click="jumpChat()">
						<view class="wechatAvatar">
							<image src="/static/index/88D5EC7E-E59C-483C-B8D6-FC8C237FDC3A_1_105_c.jpeg" />
						</view>
						<view class="info">
							<view style="font-size: 35rpx;">{{ wechatName }}</view>
							<view class="tip" style="color: #b8b8b8;">{{ wechatInfo }}</view>
						</view>
					</view>
					<view class="lind" v-if="wxlist.length - 1 !== key" />
					<view class="lind2" v-else-if="wxlist.length - 1 === key" />
				</view>
			</view>
			<view style="height: 100rpx;"></view>
			<NavigationBar />
		</scroll-view>
	</view>
</template>

<script>
	import navigation from "../component/navigation/navigation.vue"
	import NavigationBar from "../component/NavigationBar/NavigationBar.vue"
	export default {
		data() {
			return {
				wechatName: '小杜',
				wechatInfo: '"小羊"撤回了一条消息',
				isRefreshing: false,
				loadingMore: false,
				wxlist: [
					0,
				]
			}
		},
		onLoad() {

		},
		methods: {
			async loadItems() {

			},
			async onRefresh() {
				this.isRefreshing = true;
				setTimeout(() => {
					this.isRefreshing = false;
				}, 2000); // 等待2秒钟
			},
			async loadMore() {

			},
			jumpChat() {
				uni.navigateTo({
					url: '/pages/ChatPage/ChatPage'
				})
			}



		},
		components: {
			navigation,
			NavigationBar
		}
	}
</script>

<style>
	@import "index.css";
</style>